
import {Toast} from 'antd-mobile';



export let ToastShow = function (content, duration = 2, onClose, mask) {
    if (content == "") {
        return;
    }
    Toast.info(content, duration, onClose, mask)
}

export let Log = function (content) {
    console.log(content);
}
export let LogError = function (content, message) {
    console.error(content, message);
    // console.log(content, message);
}

export let ToastLoad = function (content, duration = 0, onClose, mask) {
    Toast.loading(content, duration, onClose, mask);
}

export let ToastHide = function () {
    Toast.hide();
}

export let SetScrollHeight = function (doc) {
    doc.style.height = document.body.offsetHeight - 50 - 
        document.getElementsByClassName('sjgy-navbar')[0].offsetHeight - 1 + 'px';
    doc.style.overflowY = 'scroll';
}

